package com.ethan.http;

import com.ethan.http.tgq.TgqRuleInfoParam;
import com.qunar.flight.tts.common.JsonUtil;

/**
 * @author ethan
 * create 2018-06-25 下午9:16
 * desc
 **/
public class JsonTest {

    public static void main(String[] args) {
        String json="{\n" +
                "        \"type\":\"1\",\n" +
                "        \"adultTgqRule\":{\n" +
                "            \"tgqDesc\":\"tgqDesc\",\n" +
                "            \"returnDesc\":\"returnDesc\",\n" +
                "            \"changeDesc\":\"changeDesc\",\n" +
                "            \"signDesc\":\"signDesc\",\n" +
                "            \"viewType\":3,\n" +
                "            \"hasChangePriceTime\":false,\n" +
                "            \"canChange\":false,\n" +
                "            \"canRefund\":false,\n" +
                "            \"cabin\":\"H\",\n" +
                "            \"PercentDesc\":\"PercentDesc\",\n" +
                "            \"basePrice\":30,\n" +
                "            \"timePointChargesList\":[\n" +
                "                {\n" +
                "                    \"time\":31,\n" +
                "                    \"timeDesc\":\"timeDesc\",\n" +
                "                    \"returnFee\":32,\n" +
                "                    \"changeFee\":33\n" +
                "                }\n" +
                "            ]\n" +
                "        },\n" +
                "        \"childTgqRule\":{\n" +
                "            \"tgqDesc\":\"tgqDesc12\",\n" +
                "            \"returnDesc\":\"returnDesc12\",\n" +
                "            \"changeDesc\":\"changeDesc13\",\n" +
                "            \"signDesc\":\"signDesc13\",\n" +
                "            \"viewType\":3,\n" +
                "            \"hasChangePriceTime\":false,\n" +
                "            \"canChange\":false,\n" +
                "            \"canRefund\":false,\n" +
                "            \"cabin\":\"H\",\n" +
                "            \"PercentDesc\":\"PercentDesc12\",\n" +
                "            \"basePrice\":40,\n" +
                "            \"timePointChargesList\":[\n" +
                "                {\n" +
                "                    \"time\":41,\n" +
                "                    \"timeDesc\":\"timeDesc12\",\n" +
                "                    \"returnFee\":42,\n" +
                "                    \"changeFee\":43\n" +
                "                }\n" +
                "            ]\n" +
                "        },\n" +
                "        \"babyTgqDesc\":\"babyTgqDesc\"\n" +
                "    }";
//        TgqRuleInfoParam  tgqRuleInfoParam2=  JsonUtils.deSerialize(json,TgqRuleInfoParam.class);
        TgqRuleInfoParam tgqRuleInfoParam2 =  JsonUtil.readObject(json,TgqRuleInfoParam.class);

        String a="";

    }
}
